/**
 * 多路递归复用
 */

public class MultiPathFactorial {

    /**
     * ‌斐波那契数列‌
     */
    public static int fibonacci(int n) {
        if (n == 0) {
            return 0;
        }
        if (n == 1) {
            return 1;
        }
        int x = fibonacci(n - 1);
        int y = fibonacci(n - 2);
        return x + y;
    }

    public static void main(String[] args) {
        System.out.println(fibonacci(8));
    }




}
